<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ArticleCategory extends Model
{
    protected $table    = 'article_category';
    protected $fillable = [
        "en_name",
        "name",
        "parent_id",
        "sort",
        "type",
    ];

    const TYPE_NEWS    = "news";
    const TYPE_ARTICLE = "article";
    const TYPE_PRODUCT = "product";
    const TYPE_PAGE    = "page";
    const TYPE_OTHER   = "other";

    public static $typeMap = [
        self::TYPE_NEWS    => '新闻',
        self::TYPE_ARTICLE => '文章',
        self::TYPE_PRODUCT => '产品',
        self::TYPE_PAGE    => '单页',
        self::TYPE_OTHER   => '其他',
    ];

    public static function boot()
    {
        parent::boot();

        // TODO

    }
}
